//
//
//
//
//
//
//
//
//
//
//
import {getColor} from '../utils'
export default {
name: 'mu-badge',
props: {
content: {
type: String,
default: ''
},
color: {
type: String,
default: ''
},
primary: {
type: Boolean,
default: false
},
secondary: {
type: Boolean,
default: false
},
circle: {
type: Boolean,
default: false
}
},
computed: {
badgeStyle () {
return {
'background-color': getColor(this.color)
}
},
badgeClass () {
return {
'mu-badge-circle': this.circle,
'mu-badge-primary': this.primary,
'mu-badge-secondary': this.secondary,
'mu-badge-float': this.$slots && this.$slots.default && this.$slots.default.length > 0
}
}
}
}
|